<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>list</title>
[#include "/admin/include/head.htm"]
<script type="text/javascript">
    var grid;
    var currentRowId = -1;
    var viewFrameCutHeight = 65;
    $(function () {
        grid = $("#maingrid").ligerGrid({
            columns: [
				{name: 'id', hide: true, width:0, isAllowHide: false},
				{display: '名称', name: 'name', align: 'left', width: 250 },
	            {display: '坐标X', name: 'xpoint', align: 'center', width: 100},
	            {display: '坐标Y', name: 'ypoint', align: 'center', width: 100},
	            {display: '是否有效', name: 'is_effect', align: 'center', width: 60, dict:'common'},
	          /*  {display: '是否默认', name: 'is_default', align: 'center', width: 60, dict:'common' },*/
	            {display: '创建时间', name: 'createDate', align: 'center', width: 150 }
            ],  
            pageSize:20, url: 'queryData.jhtml',
			toolbar: {}, width: '100%', height:'100%', enabledSort: true
        });
        $("#pageloading").hide();
		LG.loadToolbar(grid);
		//绑定搜索按钮
		LG.search(grid);
    });

    function add(){
        top.f_addTab(null, '新增门店城市', base + '/admin/b2c/storeCity/add.jhtml');
    }

    //编辑商品
    function edit(){
        var selecteds = grid.getSelecteds();
        if (selecteds.length != 1) {
            LG.tip('请选择一行记录!');
            return;
        }
        top.f_addTab(null, '编辑门店城市', base + '/admin/b2c/storeCity/edit.jhtml?id=' + selecteds[0].id);
    }

	function f_delete() {
		var selected = grid.getSelected();
      	if (selected) {
	      	jQuery.ligerDialog.confirm('确定删除吗?', function (confirm) {
				if (confirm){
					LG.ajax({
		              	url: base + '/admin/b2c/storeCity/delete.jhtml',
		              	loading: '正在删除中...',
		              	data: { ids: selected.id },
		              	success: function () {
		                  	LG.showSuccess('删除成功');
		                  	f_reload();
		              	},
		              	error: function (message) {
		                  	LG.showError(message);
		              	}
		          	});
				}
			});
      	} else {
          	LG.tip('请选择行!');
      	}
  	}

	
</script>
</head>
<body style="padding:10px; overflow:hidden;">
	<div id="functions" >
		<span>
			城市名称:<input type="text" class="formText" name="search_EQ_member.username" style="width:100px"/>
		</span>
		<input type="button" id="search" class="button" value="搜索"/>
		<a href="#" id="search_btn_reset" face="Wingdings 3">解除搜索,显示全部数据</a>
	</div>
	<div>
		<div id="maingrid" style="margin:0; padding:0; width:50%; float: left"> </div>
		
		<div style="margin:0; padding:0; width:50%; height:600px; float: left">
			<iframe style="display: none" id="viewFrame" src="" width="100%" height="100%"></iframe>
		</div>
	</div>
</body>
</html>